package com.qiyadeng.company.biz;

import java.util.List;

import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;

public class RespQueryTicket {
	private Ticket ticket;

	public Ticket getTicket() {
		return ticket;
	}

	public void setTicket(Ticket ticket) {
		this.ticket = ticket;
	}
	
	public static List<RespQueryTicket> getRespQueryTicketFromXml(String xml){
		XStream xstream = new XStream(new DomDriver());
		xstream.alias("informations", RespQueryTicket.class);
		xstream.aliasField("ticket", RespQueryTicket.class, "ticket");
		List<RespQueryTicket> list = (List<RespQueryTicket>)xstream.fromXML(xml);
		return list;
	}
}

class Ticket{
	private String ticketNo;
	private String ticketTypeName;
	private String startDate;
	private String endDate;
	public String getTicketNo() {
		return ticketNo;
	}
	public void setTicketNo(String ticketNo) {
		this.ticketNo = ticketNo;
	}
	public String getTicketTypeName() {
		return ticketTypeName;
	}
	public void setTicketTypeName(String ticketTypeName) {
		this.ticketTypeName = ticketTypeName;
	}
	public String getStartDate() {
		return startDate;
	}
	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}
	public String getEndDate() {
		return endDate;
	}
	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}
}
